#ifndef SPEECH_H
#define SPEECH_H

#include <QObject>
#include <http.h>
#include <QHostInfo>
#include <QFile>

//获取token
const QString baiduTokenUrl="https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials&client_id=%1&client_secret=%2&";
const QString client_id="cWAB1O0NCGsKrTPpI5MGxwLH";
const QString client_secret="7GnU0HbD40fUwsGm7S9WFotlZ3NGpvBG";
//语音识别
const QString speechUrl="http://vop.baidu.com/server_api?dev_pid=1537&cuid=%1&token=%2";
class Speech : public QObject
{
    Q_OBJECT
public:
    explicit Speech(QObject *parent = nullptr);
    QString speechIdentify(QString fileName); //解析文件
    QString getJsonValue(QByteArray ba, QString key);//通过key来解析报文 获取信息

signals:

public slots:
};

#endif // SPEECH_H
